home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / mg / rexx / mgtest.mg < prev    next >
Text File  |  1995-03-09  |  938b  |  44 lines

  1. /*
  2.  * A script to apply to a Makefile to make it build a debugging version
  3.  * of mg, instead of a production verion.
  4.  */
  5.  
  6. options results
  7. options failat 2
  8. signal on failure
  9.  
  10. /* Get to the start of the right buffer */
  11. 'find-file Makefile'
  12. 'beginning-of-buffer'
  13.  
  14. /* Fix the compile flags */
  15. 'search-forward CFLAGS'
  16. 'beginning-of-line'
  17. 'rexx-line'
  18. parse value result with first '-O' rest
  19. 'kill-line'
  20. 'rexx-insert 'slashquote(first'-g'rest, '\')
  21.  
  22. /* Now, fix the link objects */
  23. 'search-forward tmp.lnk:'
  24. 'next-line'
  25. 'beginning-of-line'
  26. 'rexx-line'
  27. parse value result with first 'lib:cres.o' rest
  28. 'kill-line'
  29. 'rexx-insert 'slashquote(first'lib:catchres.o'rest, '\')
  30.  
  31. /* And the linker flags */
  32. 'search-forward NODEBUG'
  33. 'beginning-of-line'
  34. 'rexx-line'
  35. parse value result with first 'NODEBUG' rest
  36. 'kill-line'
  37. 'rexx-insert 'slashquote(first'ADDSYM'rest, '\')
  38.  
  39. /* And exit ok */
  40. exit 0
  41.  
  42. /* We branch here if there's a problem */
  43. failure:
  44.     exit 2